Systems and methods for initially plotting mathematical functions

ABSTRACT

Technology is described herein for initially plotting the mathematical function within an interactive graph, without requiring the user to specify an initial display region of the plot. Techniques are described for automatically determining an appropriate initial range and an initial domain which define the initial display region. The initial range and initial domain are based on the identification of points of the mathematical function that may be interesting to the user. This allows a wide variety of mathematical functions to be plotted and appropriately displayed to users who may lack the mathematical knowledge necessary to select an appropriate display region.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/545,029, entitled “Systems and Methods for Providing InteractiveGraphs of Mathematical Functions” filed 7 Oct. 2011, which isincorporated by reference herein.

BACKGROUND

The present invention relates to information retrieval systems. Inparticular, it relates to systems and methods for categorizing a queryrepresenting a mathematical function, and embedding an interactive graphof the mathematical function within a search results web page.

Various computer software packages and devices such as graphingcalculators enable users to graph mathematical functions. A graph allowsa user to visualize the mathematical function, in a manner that can aidin the understanding of abstract mathematical concepts. For example,when a student is learning a new concept that involves a mathematicalfunction, a graph of the function can provide a better understanding ofthe underlying principles.

However, these computer software packages and devices can be difficultto learn and time consuming to use. A student learning a newmathematical concept may not have the knowledge necessary to correctlygraph a mathematical function using these computer software packages anddevices. In such a case, the student is unable to utilize a graph of themathematical function as a learning tool.

It is therefore desirable to provide techniques for graphingmathematical functions in a manner that is convenient and useful for theuser.

SUMMARY

In one implementation, a method is described including determining,using a computing device, a mathematical function within a querysubmitted by a user. The method also includes identifying transitionpoints based on function values of the mathematical function forcorresponding variable values of an independent variable in themathematical function. The method also includes selecting an initialgraph range for the variable values of the independent variable based atleast in part on a number of the identified transition points within theselected initial graph range. The method also includes selecting aninitial graph domain for the function values based on the initial graphrange of the independent variable. The method also includes providingthe selected initial graph range and the initial graph domain for use ininitially plotting the mathematical function in a graph displayed to theuser.

This method and other implementations of the technology disclosed caneach optionally include one or more of the following features.

The transition points can include at least one point selected from agroup including where a function value of the function values is zero,where a first derivative of the mathematical function is zero, and wherea second derivative of the mathematical function is zero or exceeds apredefined value.

The transition points can include at least one point where themathematical function has a vertical asymptote.

The initial graph range can include all of the identified transitionpoints.

The initial graph range can include a number of the identifiedtransition points between a minimum threshold number and a maximumthreshold number.

Selecting the initial graph domain can include calculating functionvalues for corresponding variable values of the independent variablewithin the initial graph range. The initial graph domain can then beselected based on a minimum function value and a maximum function valuewithin the calculated function values.

Selecting the initial graph range can include determining whether themathematical function is a predetermined function type. If themathematical function is a predetermined function type, transitionpoints can be identified having characteristics that depend on thepredetermined function type of the mathematical function.

Selecting the initial graph range can include calculating functionvalues for overlapping ranges of variable values for the independentvariable. The transition points within the overlapping ranges can thenbe determined. The initial graph range can then be selected from amongthe overlapping ranges based on a number of transition points within theoverlapping ranges.

Scores can be calculated for the overlapping ranges. A score for a givenoverlapping range is based on the number of transition points occurringwithin the given overlapping range. The initial graph range can then beselected from among the overlapping ranges based on the scores.

The score for the given overlapping range can be weighted based oncorresponding variable values of the independent variable at thetransition points.

Other implementations may include a non-transitory computer readablestorage medium storing instructions executable by a processor to performa method as described above. Yet another implementation may include asystem including memory and one or more processors operable to executeinstructions, stored in the memory, to perform a method as describedabove.

Particular implementations of the subject matter described herein can beimplemented to initially plot a mathematical function within aninteractive in a manner that is useful to the user, without requiringthe user to specify an initial display region of the plot. Anappropriate initial range and an initial domain can be which define theinitial display region can be automatically determined, based on theidentification of points of the mathematical function that may beinteresting to the user. This allows a wide variety of mathematicalfunctions to be plotted and appropriately displayed to users who maylack the mathematical knowledge necessary to select an appropriatedisplay region.

Particular aspects of one or more implementations of the subject matterdescribed in this specification are set forth in the drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of an example environment forproviding an interactive plot of a mathematical function within a searchresults web page.

FIG. 2 is a flow chart illustrating an example process for providing aninteractive graph within a search results web page.

FIG. 3 is an example user interface that can be used to provide aninteractive graph of a mathematical function within a search results webpage.

FIG. 4A-4C are examples of the user interface in FIG. 3 after userinteraction with the interactive graph.

FIG. 5 is a block diagram of an example computer system.

FIG. 6 is a block diagram illustrating example modules within thegraphing engine.

FIG. 7 is a flow chart of an example process for selecting an initialgraph range and an initial graph domain.

FIGS. 8A and 8B illustrate an example of overlapping ranges for a plotof a mathematical function.

FIG. 9 illustrates an example of a selected initial graph range and aselected initial graph domain for use in initially plotting an examplemathematical function.

FIG. 10 illustrates an example process for the steps in the flow chartof FIG. 7 of identifying transition points and selecting an initialgraph range.

FIG. 11 is a block diagram illustrating example modules within theinteractive graphing module.

FIG. 12 is a flow chart of an example process that determines thesampling of the mathematical function for display within the searchresults web page.

DETAILED DESCRIPTION

The technology described enhances a user's search experience byproviding an interactive graph of a mathematical function within asearch results web page. The search results web page is provided by asearch engine in response to a user's query representing themathematical function. The interactive graph provides the user with arich interactive experience that facilitates and encourages the user'sunderstanding of mathematical concepts and underlying principles.

The user can enter the mathematical function into a search field on aclient device in the same way the user would write the mathematicalfunction or read it in a book. As a result, the user can quickly andconveniently enter and submit the mathematical function to be graphed,in a manner that does not require user knowledge of complex computersoftware packages or specialized devices such as graphing calculators.

One aspect of the technology described includes initially plotting themathematical function within the interactive graph, without requiringthe user to specify an initial display region of the plot. Techniquesare described for automatically determining an appropriate initial rangeand an initial domain which define the initial display region. Theinitial range and initial domain are based on the identification ofpoints of the mathematical function that may be interesting to the user.This allows a wide variety of mathematical functions to be plotted andappropriately displayed to users who may lack the knowledge to select anappropriate display region that correctly plots the function.

Another aspect of the technology described herein includes quickly,efficiently and accurately rendering a plot of the mathematical functionwithin the interactive graph. Techniques are described for determining asampling resolution indicating the points of the mathematical functionto be plotted within the display region. The sampling resolutionincludes a higher number of sample points in sections of themathematical function with function values that change considerably, andincludes a lower number of sample points in sections with functionvalues that change slightly.

Environment Overview

FIG. 1 illustrates a block diagram of an example environment 100 forproviding an interactive plot of a mathematical function within a searchresults web page. As used herein, a web page refers to an electronicdocument or resource of information that is accessed through a webbrowser or similar type of application for display on a client device.

The environment 100 includes a client device 110, a search engine 150and a graphing engine 170. The environment 100 also includes acommunication network 140 that allows for communication between thevarious components in the environment 100.

The client device 110 includes memory for storage of data and softwareapplications, a processor for accessing data and executing applications,input and output devices that allow for user interaction, and componentsthat facilitate communication over the communication network 140. Theclient device 110 executes an application, such as a web browser 120,having a search field that allows a user to enter a query and submit itto the search engine 150. The query submitted by the user may representa mathematical function that the user would like to graph.

The search field may be provided within a web page displayed in thebrowser 120. Alternatively, the search field may be implemented as anadd-on to the browser 120, for example as a plug-in or extension to thebrowser 120. As another example, the search field may be integrated intothe browser 120 or other software application executing on the clientdevice 110.

The user may submit the query to the search engine 150 by selecting asearch button displayed adjacent to the search field, or entering acarriage return or equivalent character using a keyboard. Alternatively,the browser interface may process user interactions without requiringexplicit submission, as the user types. As another example, the user maysubmit the query by saying a command in a speech interface or pausingfor more than a predetermined period of time.

In the examples provided herein, the user's query represents a singlemathematical function. However, the techniques described herein can alsobe utilized to provide an interactive graph of two or more mathematicalfunctions represented within a user's query. For example, a user mayenter a query ‘plot sin(x) and cos(x)’ to request an interactive graphcontaining both of the functions sin(x) and cos(x) together.

In the examples provided herein, the user's query represents amathematical function having one independent variable, for example ‘x’,‘t’, etc., and one dependent variable, for example ‘y’. However, thetechniques described herein can also be utilized to provide interactivegraphs of mathematical functions having more than one independentvariable. In addition, in some implementations the user is not requiredto include the dependent variable within the query.

In some implementations, the user's query is of the form:

[[plot|graph] [of|for] [var1=] func(var2) [[[when|where] var2 is] fromexpr1 to expr2]where ‘plot|graph’ and ‘of|for’ are optional plot directives, var1 isthe dependent variable in the mathematical function, func( ) is themathematical function in terms of the independent variable var2, andexpr1 and expr2 are constant values for the independent variable var2that define an optional user specified graph range. In otherimplementations, the form of the user's query may be different.

The user's query may also include other directives, as well as otherterms that enable additional interactive functionality within the graph.For example, a user may enter a query ‘plot sin(x) with tangent’ torequest an interactive graph containing a plot of the function sin(x),together with the tangent of sin(x). As another example, a user mayenter a query ‘integrate sin(x) from 7 to k’ to request an interactivegraph of the integral. In some implementations, the user may then move acursor over a location on the graph to interactively change the value of‘k’ and update the plot accordingly.

The mathematical function ‘func( )’ may include a composition ofconstants, mathematical functions and mathematical operators such as‘=’, ‘/’, ‘*’, ‘̂’, etc. Examples of the mathematical functions includealgebraic functions, and transcendental functions such as trigonometricfunctions, exponential functions and logarithmic functions.

The search engine 150 receives the user's query from the client device110. As used herein, the term “search engine” refers to an informationretrieval system that returns search results identifying a list ofelectronic documents relevant to a query. The search engine 150 includesmemory for storage of data and software applications, a processor foraccessing data and executing applications, and components thatfacilitate communication over the communication network 140.

The search engine 150 forwards the user's query or a parsed version ofthe user's query to a graphing engine 170. The graphing engine 170includes memory for storage of data and software applications, aprocessor for accessing data and executing applications, and componentsthat facilitate communication over the communication network 140. In theillustrated example, the network 140 is illustrated between the searchengine 150 and the graphing engine 170. In some implementations, thegraphing engine 170 is within the search engine 150.

The graphing engine 170 parses the user's query into tokens usingparsing rules, or uses a parsed version of the user's query. Thegraphing engine 170 then compares the tokens to a list of token types todetermine whether the user's query represents a mathematical function.If the user's query represents a mathematical function, the graphingengine 170 extracts the variables, mathematical expressions, and theoptional user specified graph range within the query. In someimplementations, the graphing engine 170 translates the mathematicalfunction into an abstract syntax tree (AST).

The graphing engine 170 also selects an initial graph range and aninitial graph domain for use in initially plotting the mathematicalfunction within an interactive graph displayed to the user. The initialgraph range is the range of coordinate values for the independentvariable, for example ‘x’, that are initially included in the display ofthe interactive graph. The coordinate values for the independentvariable are also referred to herein as variable values.

The initial graph domain is the domain of coordinate values for thedependent variable, for example ‘y’, that are initially included in theplot. The values of the dependent variable are also referred to hereinas the function values for the mathematical function. The initial graphrange and the initial graph domain define the initial display region ofthe plot in the interactive graph.

In the examples provided herein, the interactive graph is displayed in atwo-dimensional Cartesian coordinate system, with the independentvariable represented on the horizontal, for example ‘x’, axis and thedependent variable represented on the vertical, for example ‘y’, axis.Alternatively, the interactive graph may be displayed using other typesof coordinate systems.

If the user's query includes a specified graph range, the graphingengine 170 selects the specified graph range as the initial graph range.If the user's query does not include a specified graph range, thegraphing engine 170 selects the initial graph range using the techniquesdescribed below with reference to FIG. 7.

The graphing engine 170 calculates the function values for themathematical function within the initial graph range to determine theinitial graph domain. In some embodiments, the graphing engine 170selects the initial graph domain based on a minimum function value and amaximum function value within the initial graph range. For example, theinitial graph domain may be from the 15th percentile of the functionvalues within the initial graph range, to the 85th percentile of thefunction values within the initial graph range. As another example, the15^(th) to 85^(th) percentile may be preliminarily selected, and thenoptionally expanded to include additional transition points (describedbelow) that may lie outside the 15^(th) to 85^(th) percentile. As yetanother example, the 15^(th) to 85^(th) percentile may be preliminarilyselected, and then increased by a predetermined factor if there areasymptotes within the initial graph range.

The graphing engine 170 then generates an interactive graphing module135 (described below) for the mathematical function. The graphing engine170 transmits the interactive graphing module 135 to the search engine150. As described below, the interactive graphing module 135 is insertedinto a search results web page 125 produced by the search engine 150.When the search results web page 125 is displayed in a web browser 120on the client device 110, the web browser 120 executes the interactivegraphing module 135.

The interactive graphing module 135 may be implemented in JavaScript orother suitable programming language. The interactive graphing module 135contains instructions executable to display the interactive graph andprovide the interactive functionality described herein. The interactivegraphing module 135 includes instructions identifying the mathematicalfunction, and the initial graph range and the initial graph domain foruse in initially plotting the mathematical function in the interactivegraph.

The search engine 150 receives the interactive graphing module 125 fromthe graphing engine 170. In addition, the search engine 150 alsoexecutes the user's query against a collection of documents 160 toproduce search results. The search results identify a list of documentsin the collection of documents 160 that are responsive to the user'squery. The search engine 150 can use conventional or other techniques todetermine which documents in the collection of documents 160 to includein the search results.

The collection of documents 160 may be collectively stored on multiplecomputers and/or storage devices. A document in the collection ofdocuments 160 may be a web page, a word processing document, a portabledocument format (PDF) document, or any other type of electronicdocument. In some implementations, the collection of documents 160 isobtained from the World Wide Web.

In response to the user's query, the search engine 150 generates asearch results web page 125 that includes the search results and theinteractive graphing module 135. The interactive graphing module 135 mayfor example appear at the top of the search results web page 125(sometimes referred to as a “one-box” user interface), separate from thesearch results. The search engine 150 then transmits the search resultsweb page 125 to the client device 110.

The client device 110 displays the search results web page 125 within anapplication, such as the web browser 120, executing on the client device110. The display of the search results web page 125 executes theinstructions in the interactive graphing module 135 within the searchresults web page 125 to display the interactive graph of themathematical function. In the examples described herein, the user of theclient device 110 submits queries and views the resulting search resultsweb page 125 using the web browser 120. Alternatively, the user maysubmit queries and view the resulting search results web page 125 usinga different application executing on the client device 110.

The interactive graphing module 135 generates the display of theinteractive graph and updates the graph in response to user interaction.The interactive graphing module 135 may generate the display of theinteractive graph using scalable vector graphics (SVG).

The user of the client device 110 can interact with the interactivegraph within the search results web page 125 by performing variousactions that correspond to requests that the graph be changed. Inparticular, the user can interact with the interactive graph to requesta change in the display region of a plot of the mathematical functionwithin the interactive graph. In response to the user's interaction, theinteractive graphing module 135 then updates the display of theinteractive graph within the search results web page 125.

The user may interact with the interactive graph using a keyboard, apointing device such as a mouse, a touchscreen incorporated into thedisplay of the client device, or any other type of user input device forthe client device 110.

The interactive graph may include various user interface elements suchas buttons, numeric controls, text boxes, check boxes, etc., thatprovide a user interface that enables the user to interact with thegraph to perform various actions. For example, the interactive graph mayinclude buttons for zooming in or out to change a zoom level of theplot. The buttons for zooming may include buttons for zooming in and outon both axes of the plot at the same time. The buttons for zooming mayalso include buttons for zooming in and out on a single axis of theplot, without changing the zoom level of the other axis. The interactivegraph may also include navigational buttons for panning the plot left,right, up and down.

The interactive graph may also provide additional interactivefunctionality. For example, the user may click and drag the cursoracross the graph to pan in a desired direction. The user may also zoomin and out using a mouse wheel or other input device. In someembodiments, the user may also zoom out by moving the cursor over thegraph and double-clicking on a mouse button, e.g. a ‘right’ mousebutton.

As another example, the user may place (hover) the cursor over alocation on the graph to display a marker at a position on the plot ofthe mathematical function that depends on the location of the cursor.The graph may also include a box displaying a function value and avariable value that indicate the position of the marker on the plot. Theuser may then move the cursor across the graph to change the position ofthe marker on the plot and view an update of the function value andvariable value displayed in the text box.

The interactive graph may also enable the user to annotate, print andexport the function values and corresponding variable values. Forexample, the user may place the cursor over the graph and right click onthe mouse to display a menu, and select the appropriate option withinthe menu. The user may also copy the graph into another tab or anotherapplication, such as a word processing application, executing on theclient device 110 by clicking on the graph and dragging.

The interactive graphing module 135 enables the user to change thedisplay of the interactive graph directly within the search results webpage 125, without re-displaying the entire search results web page 125.The interactive graphing module 135 executes directly on the clientdevice 110, without requiring further communication with the graphingengine 170 to update the display of the graph. This allows the plot ofthe mathematical function to be updated quickly in response to userinteraction.

The network 140 facilitates communication between the various componentsin the environment 100. The network 140 may utilize a combination ofdedicated or private communications links and public communicationlinks. In one embodiment, the network 140 uses standard communicationstechnologies, protocols, and/or inter-process communications techniques.

Many other configurations of the environment 100 are possible havingmore or less components than the environment 100 shown in FIG. 1. Forexample, the environment 100 can include many more client devices thatsubmit queries to the search engine 150.

FIG. 2 is a flow chart illustrating an example process for providing aninteractive graph within a search results web page. Otherimplementations may perform the steps in different orders and/or performadditional or different steps than the ones illustrated in FIG. 2.

At step 200, a user of the client device 110 enters a query representinga mathematical function and submits it to the search engine 150.

At step 202, the search engine 150 forwards the query to the graphingengine 170. At step 204, the graphing engine 170 processes the query toidentify the mathematical function.

At step 206, the graphing engine 206 produces an interactive graphingmodule for the mathematical function. The graphing engine 170 transmitsthe interactive graphing module to the search engine 150.

At step 208, the search engine 150 produces search results for theuser's query. At step 210, the search engine 150 produces a searchresults web page that includes the search results and the interactivegraphing module. The search engine 150 transmits the search results webpage to the client device 110.

At step 212, the search results web page is displayed on the clientdevice 110. The display of the search results web page includesexecuting the interactive graphing module to display an interactivegraph of the mathematical function.

At step 214, the client device 110 receives user interaction with theinteractive graph. At step 216, the interactive graphing module updatesthe display of the graph in the search results web page based on theuser interaction.

FIG. 3 is an example user interface 300 that can be used to provide aninteractive graph of a mathematical function within a search results webpage. The user interface 300 includes a search results web page 310 thatis displayed to a user in response to a query.

The search results web page 310 includes a first portion 315 displayingan interactive graph 320 with a plot 325 of a mathematical function. Inthis example, the user's query 350 is ‘sin(x)’.

The interactive graph 320 includes a button 340 selectable by the userto zoom-in on the plot 325 in the interactive graph 320. The interactivegraph 320 also includes a button 342 selectable by the user to zoom-outon the plot 325 in the interactive graph 320.

The user may also place (hover) a cursor over a location on theinteractive graph 320 to display a marker at a position on the plot 325that is based on the location of the cursor. A box 344 displays thefunction value 346 and the variable value 348 indicating the position ofthe marker. The user may move the cursor to change the position of themarker on the plot and update the corresponding values 346, 348 in thebox 344.

The interactive graph 320 may also include additional buttons that areselectable to provide additional user interaction functionality. Forexample, the interactive graph 320 may include buttons to zoom in andzoom out on the x-axis of the plot, without changing the zoom level ofthe y-axis. The interactive graph 320 may also include buttons to zoomin and zoom out on the y-axis of the plot, without changing the zoomlevel of the x-axis. The user may also request to change a zoom level ofa single axis of the plot by right clicking on the graph to display amenu, and selecting the appropriate option within the menu.

The interactive graph 320 may also include a button to return to theinitial display region of the plot, a share button for sharing the plotwith classmates or other users through social networking, and buttons tomove the position of the marker to a next ‘interesting point’ in theplot 325, such as the next root, a minimum point, an inflection point,etc.

In some embodiments, the user may also share the graph 320 by clickingon the graph 320 and dragging to an appropriate location within a socialnetworking menu bar embedded within the browser 120. In someembodiments, the user may also copy the graph into another application,such as a word processing application, executing on the client device byclicking on the graph and dragging into the other application.

The search results web page 310 also includes a second portion 330displaying search results for the user's query. The search resultsinclude links to a list of documents that are responsive to the user'squery.

FIG. 4A is an example of the user interface 300 in FIG. 3 after userinteraction with the interactive graph 320. In this example, the userinteraction corresponds to zooming-out on both axes of the plot 325 byclicking on the button 342. As shown in FIG. 4A, the display of theinteractive graph 320 has been updated based on the user interaction,without re-displaying the entire search results web page 310

FIG. 4B is an example of the user interface 300 in FIG. 3 after userinteraction with the interactive graph 320. In this example, the userinteraction corresponds to zooming-in on both axes of the plot 325 byclicking on the button 340.

FIG. 4C is an example of the user interface 300 in FIG. 3 after userinteraction with the interactive graph 320. In the example, the userinteraction corresponds to zooming-out on both axes of the plot 325 byclicking on the button 340, followed by panning the plot 325 to theright by clicking and dragging a cursor across the graph 320.

Example Computer System

FIG. 5 is a block diagram of an example computer system. Computer system510 typically includes at least one processor 514 which communicateswith a number of peripheral devices via bus subsystem 512. Theseperipheral devices may include a storage subsystem 524, including forexample memory devices and a file storage subsystem, user interfaceinput devices 522, user interface output devices 520, and a networkinterface subsystem 516. The input and output devices allow userinteraction with computer system 510. Network interface subsystem 516provides an interface to outside networks, including an interface tocommunication network 140, and is coupled via communication network 140to corresponding interface devices in other computer systems.

User interface input devices 522 may include a keyboard, pointingdevices such as a mouse, trackball, touchpad, or graphics tablet, ascanner, a touchscreen incorporated into the display, audio inputdevices such as voice recognition systems, microphones, and other typesof input devices. In general, use of the term “input device” is intendedto include possible types of devices and ways to input information intocomputer system 510.

User interface output devices 520 may include a display subsystem, aprinter, a fax machine, or non-visual displays such as audio outputdevices. The display subsystem may include a cathode ray tube (CRT), aflat-panel device such as a liquid crystal display (LCD), a projectiondevice, or some other mechanism for creating a visible image. Thedisplay subsystem may also provide non-visual display such as via audiooutput devices. In general, use of the term “output device” is intendedto include all possible types of devices and ways to output informationfrom computer system 510 to the user or to another machine or computersystem.

Storage subsystem 524 stores programming and data constructs thatprovide the functionality of some or all of the modules describedherein, including the logic to carry out the processes described herein.These software modules are generally executed by processor 514 alone orin combination with other processors.

Memory 526 used in the storage subsystem can include a number ofmemories including a main random access memory (RAM) 530 for storage ofinstructions and data during program execution and a read only memory(ROM) 532 in which fixed instructions are stored. A file storagesubsystem 528 can provide persistent storage for program and data files,and may include a hard disk drive, a floppy disk drive along withassociated removable media, a CD-ROM drive, an optical drive, orremovable media cartridges. The modules implementing the functionalityof certain embodiments may be stored by file storage subsystem in thestorage subsystem 524, or in other machines accessible by the processor.

Bus subsystem 512 provides a mechanism for letting the variouscomponents and subsystems of computer system 510 communicate with eachother as intended. Although bus subsystem 512 is shown schematically asa single bus, alternative embodiments of the bus subsystem may usemultiple busses.

Computer system 510 can be of varying types including a workstation,server, computing cluster, blade server, server farm, or any other dataprocessing system or computing device. Due to the ever-changing natureof computers and networks, the description of computer system 510depicted in FIG. 5 is intended only as a specific example for purposesof illustrating the preferred embodiments. Many other configurations ofcomputer system 510 are possible having more or less components than thecomputer system depicted in FIG. 5.

Graphing Engine

FIG. 6 is a block diagram illustrating example modules within thegraphing engine 170. In FIG. 6, the graphing engine 170 includes afunction identification module 610, an initial graph module 620, and ageneration module 630. Some implementations may have different and/oradditional modules than those shown in FIG. 6. Moreover, thefunctionalities can be distributed among the modules in a differentmanner than described herein.

The function identification module 610 parses the user's query intotokens using parsing rules. The function identification module 610 thencompares the tokens to a list of token types to determine whether theuser's query represents a mathematical function. If the user's queryrepresents a mathematical function, the function identification module610 extracts the variables, mathematical expressions, and the optionaluser specified graph range. The function identification module 610provides data indicating the mathematical function to the generationmodule 630 (described below). In some embodiments, the functionidentification module 610 translates the mathematical function into anAST for use in producing the interactive graphing module.

The initial graph module 620 selects the initial graph range and theinitial graph domain for use in initially plotting the mathematicalfunction in the interactive graph displayed to the user. If the user'squery includes a specified graph range, the initial graph module 620selects the specified graph range as the initial graph range. If theuser's query does not include a specified graph range, the initial graphmodule 620 identifies transition points of the mathematical function inorder to select the initial graph range.

A transition point is a point on a plot of the mathematical functionhaving characteristics that match certain criteria. The criteria enablesthe identification of points of the mathematical function that may beinteresting to the user, and thus potentially should be included in theinitial display of the graph. The identification of transition pointsand the selection of the initial graph range are described in moredetail below with reference to FIGS. 7-9.

The initial graph module 620 calculates the function values for themathematical function within the initial graph range to select theinitial graph domain. The initial graph module 620 provides the initialgraph range and the initial graph domain to the generation module 630.

The generation module 630 then produces the interactive graphing module.The interactive graphing module contains instructions executable todisplay the interactive graph and provide the interactive functionalitydescribed herein. The interactive graphing module includes instructionsidentifying the mathematical function, and the initial graph range andthe initial graph domain for use in initially plotting the mathematicalfunction in the interactive graph.

FIG. 7 is a flow chart of an example process for selecting an initialgraph range and an initial graph domain. Other implementations mayperform the steps in different orders and/or perform different oradditional steps than the ones illustrated in FIG. 7. For convenience,FIG. 7 will be described with reference to one or more computers thatperform the process. The system can be for example, the initial graphmodule 620 described above with reference to FIG. 6.

At step 700, the system identifies transition points based on functionvalues for corresponding variable values of an independent variable inthe mathematical function. The characteristics of the function values ofthe mathematical function used to determine whether a point is atransition point can vary from implementation to implementation. Thecharacteristics may also depend on the function type of the mathematicalfunction. For example, different characteristics may be used if themathematical function is a polynomial than if the mathematical functionis a trigonometric function.

In some implementations, the transition points include one or more ofthe points where the function value is zero, where the first derivativeof the mathematical function is zero, an inflection point where thesecond derivative of the mathematical function is zero, or where thesecond derivative or higher derivative exceeds a predefined value. Thetransition points may also include points where the mathematicalfunction has a vertical asymptote. The transition points may alsoinclude points that are adjacent to points having undefined functionvalues. The transition points may also include points where thederivative is a minimum, or where the derivative is a maximum. Thetransition points may also include global-regional minimums andmaximums, where a predetermined number of minimums and maximums areselected within a range of values for the independent variable. Thetransition points may also include global-regional minimum and maximumderivatives. The transition points may also include points where thecurvature is maximum and minimum. The identification of transitionpoints is described in more detail below with reference to FIG. 9.

At step 702, the system selects an initial graph range for the variablevalues of the independent variable based on the number of identifiedtransition points within the range. The initial graph range may forexample be selected to include all of the identified transition points.In some alternatives, the initial graph range includes a number ofidentified transition points between a minimum threshold number and amaximum threshold number. As another example, the initial graph rangemay be selected to include less than a threshold number of certain typesof transition points. For example, the initial graph range may be chosenso that the number of minima points within the range is less than apredetermined number, the number of maxima points within the range isless than the predetermined number, the number of asymptotes within therange is less than the predetermined number, etc. These transitionpoints may be those that are closest to the origin.

If the system does not identify any transition points, the system cancalculate function values of the mathematical function for overlappingranges for the independent variable to select the initial graph range.In some implementations, each of the overlapping ranges are [−10^(K),10^(K)] for the independent variable, where K is a different value foreach overlapping range. The number of variable values within eachoverlapping range and the number of overlapping ranges can vary fromimplementation to implementation. In some embodiments, the number ofvariable values within each overlapping range is 1000 points that arechosen randomly.

Each overlapping range may for example be scored based on the percentageof points that have defined function values. The score may be weightedbased on the extent of the corresponding range. The highest scoringoverlapping range may then be selected as the initial graph range.

At step 704, the system selects an initial graph domain based on theselected initial graph range. The initial graph domain may for examplebe based on a minimum function value and a maximum function value withinthe initial graph range. For example, the initial graph domain may befrom the 15th percentile of the function values within the initial graphrange, to the 85th percentile of the function values within the initialgraph range. As another example, the 15^(th) to 85^(th) percentile maybe preliminarily selected, and then optionally expanded to includeadditional transition points (described below) that may lie outside the15^(th) to 85^(th) percentile. As yet another example, the 15^(th) to85^(th) percentile may be preliminarily selected, and then increased bya predetermined factor if there are asymptotes within the initial graphrange.

At step 706, the system provides the selected initial graph range andthe selected initial graph domain for use in initially plotting themathematical function in the interactive graph displayed to the user. Inthis example, the selected initial graph range and the selected initialgraph domain are provided to the generation module 630. The generationmodule 630 then includes instructions in the interactive graphing module315 to initially plot the mathematical function with the initial graphrange and the initial graph domain.

To aid in the understanding of certain processes described herein, anexample for scoring and selecting the highest scoring overlapping rangeis provided below. In this example, the mathematical function isy=sqrt(sin(abs(x)̂0.5))*x.

In this example, there are four overlapping ranges for the independentvariable ‘x’. A first overlapping range 800 is [−1, 1], a secondoverlapping range 810 is [−10, 10], a third overlapping 820 range is[−100, 100] and a fourth overlapping range 830 [−1000, 1000]. FIG. 8A isa plot showing the function over the ranges 800, 810, 820. FIG. 8B is azoomed out view of the plot in FIG. 8A to show the function over therange 830.

In this example, the score for a given overlapping range is calculatedas the fraction of the points in the range that have defined functionvalues, multiplied by a predetermined weighting factor for the range. Inthis example, the weighting factors for the various overlapping rangesare given by the following weighting table:

Overlapping Range Weighting Factor [−1, 1] 1.5 [−10, 10] 2.0 [−100, 100]1.0 [−1000, 1000] 1.0

The function in this example is defined everywhere within the range 800.As a result, the fraction of defined function value points for the range800 is 1. In contrast, the function is defined over approximately 57.5%of the range 820. As a result, the fraction of defined function valuepoints for the range 820 is 0.575. The fraction of the defined functionvalue points for the other ranges 810, 830 can be determined in asimilar manner. The fraction of the defined function value points ineach overlapping range for this example are summarized in the followingtable:

Overlapping Range Fraction of Defined Function Value Points [−1, 1] 1.0[−10, 10] 0.988 [−100, 100] 0.575 [−1000, 1000] 0.458

The scores for each of the overlapping ranges is then given by thefollowing table:

Overlapping Range Score [−1, 1] 1.5 [−10, 10] 1.976 [−100, 100] 0.575[−1000, 1000] 0.458

Thus, in this example, the range 810 is the highest scoring overlappingrange. As a result, the range 810 will be selected as the initial graphrange for use in plotting the mathematical function mathematicalfunction is y=sqrt(sin(abs(x)̂0.5))*x.

FIG. 9 illustrates an example of a selected initial graph range 900 anda selected initial graph domain 910 for use in initially plotting anexample mathematical function 920. In this example, the mathematicalfunction 920 is y=1.5x̂3−8x̂2+4x+12. In this example, the selected initialgraph range 900 is from −5.69344 to 5.69344, and the selected intervalgraph domain is from −16.7018 to 16.7018.

FIG. 10 illustrates an example process for the steps 700, 702 in theflow chart of FIG. 7 of identifying transition points and selecting aninitial graph range. Other implantations may perform the steps indifferent orders and/or perform different or additional steps than theones illustrated in FIG. 10. For convenience, FIG. 10 will be describedwith reference to one or more computers that perform the process. Thesystem can be for example, the initial graph module 620 described abovewith reference to FIG. 6.

At step 1000, the system determines whether the mathematical function isa predetermined function type. Examples of predetermined function typesmay include polynomials, rational functions and trigonometric functions.

If the mathematical function is a predetermined function type, theprocess continues to step 1002. At step 1002, the system identifiestransition points having characteristics that depend on the functiontype. In particular, the system identifies transition points that matchcriteria that depends on the function type.

For example, if the mathematical function is a polynomial, thetransition points identified by the system may include roots, minima,maxima and inflection points. If the mathematical function is a rationalfunction, the transition points identified by the system may includeminima, maxima, inflection points, zeros and poles. If the mathematicalfunction includes a trigonometric function such as sin(ax−b), cos(ax−b)tan(2ax−2b) or cot(2ax−2b), the transition points may include pointscorresponding to values of the variable which are multiples of π*b/2a.

At step 1004, the system selects the initial graph range based on thenumber of transition points within the range. The system may select theinitial graph range using the techniques described above with referenceto step 702 in FIG. 7. The process then continues to step 704.

Returning to step 1000, if the mathematical function is not apredetermined function type, the process continues to step 1006. At step1006, the system calculates values of the mathematical function foroverlapping ranges for the variable.

In some implementations, each of the overlapping ranges are from[−10^(K), 10^(K)] for the independent variable, where K is a differentvalue for each overlapping range. The number of values within eachoverlapping range and the number of overlapping ranges can vary fromimplementation to implementation. In some embodiments, the number ofvalues within each overlapping range is 1000. The number of overlappingranges may be for example 10, with K equal to −2, 0, 1, 2, 3, 4, 5, 6, 7and 9. For example, the overlapping range for k=0 is from [−1, 1] forthe independent variable, and the overlapping range for k=1 is from[−10, 10].

At step 1008, the system identifies transition points within theoverlapping ranges. In some implementations, the transition locationsare identified by numerically approximating the roots, minima and maximathat occur within each overlapping interval.

At step 1010, the system selects the initial graph range from among theoverlapping ranges based on the number of transition points within theoverlapping ranges. Each overlapping range may for example be scoredbased on the number of transition points that occur within it. The scoremay be weighed based on the corresponding values of the variable at thetransition points. The highest scoring overlapping range may then beselected as the initial graph range.

The process then continues to step 704 in FIG. 7.

Interactive Graphing Module

FIG. 11 is a block diagram illustrating example modules within theinteractive graphing module 135. In FIG. 11, the interactive graphingmodule 135 includes a display module 1110 and a user interaction module1130. Some implementations may have different and/or additional modulesthan those shown in FIG. 11. Moreover, the functionalities can bedistributed among the modules in a different manner than describedherein.

The display module 1110 generates the display of the interactive graphand updates the graph in response to user interaction. The interactivegraphing module 135 may generate the display of the interactive graphusing scalable vector graphics (SVG). As described in more detail below,the display module 1110 performs calculations and selects points for usein plotting the mathematical function.

The display module 1110 determines a sampling resolution indicating thepoints of the mathematical function to be plotted within a visible frameof the interactive graph. The visible frame is the portion of the plotin the display region of the interactive graph viewable to the user. Asdescribed in more detail below, the sampling resolution for the visibleframe is obtained by increasing the number of sample points where thefunction value rapidly changes. The sampling of the visible frame isdescribed in more detail below with reference to FIG. 12.

The display module 1110 also calculates a sampling resolution ofsupplementary points of the mathematical function in external frames.The external frames are sections of the plot adjacent to the visibleframe, and not currently viewable to the user. In some embodiments, thesampling resolution of external frames is performed by uniformlysampling the function for corresponding variable values of the variableoutside the visible frame.

The supplementary points can then be used to quickly update the plot inresponse to user interaction with the graph. Upon receiving userinteraction corresponding to a request to change the display region ofthe plot, the display module 1110 can change the plot to includesupplementary points that have already been identified. For example,when the user clicks and drags the cursor across the graph to pan in adesired direction, the display module 1110 uses the supplementary pointsof a previously external frame as updated points plotted in the graph.Once the user releases the mouse button, the display module 1110 maycalculate a new sampling resolution for the visible frame and re-plotthe function using the new sampling resolution.

The display module 1110 also determines the positions of the major andminor ticks to be displayed on the vertical axis and the horizontal axisof the graph. The major ticks are the ticks on an axis that are shownwith displayed axis values. The minor ticks are the ticks on an axisthat are shown without displayed axis values. The techniques fordetermining the positions of the major ticks and minor ticks can varyfrom implementation to implementation.

In some implementations, the display module 1110 determines thepositions of the minor ticks within the visible frame by calculating theminimum number of equally spaced minor ticks that are greater than apredefined minimum. The predefined minimum may for example be based onthe number of pixels in the interactive graph in the direction of theaxis.

In some implementations, the spacing between adjacent minor ticks mayfor example be expressed mathematically as 1*base*10̂k or 5*base*10̂k,where ‘k’ is an integer value and ‘base’ is a constant. The value of‘base’ may for example be an integer value such as 1. The value of‘base’ may also depend on the mathematical function type. For example,if the mathematical function is a trigonometric function, the ‘base’ maybe π.

The display module 1110 may then select some of the minor ticks to bemajor ticks. The display module 1110 may calculate a score for each ofthe minor ticks to determine which minor ticks to select. The score of agiven minor tick may for example be based on its corresponding axisvalue. For example, the score may be based on the number of minor ticksbetween the given minor tick and a predefined axis value such as zero.

In some implementations, the score may be based on which digits appearwithin the fractional part of the corresponding axis value. When writtenin decimal notation, the fractional part corresponds to the digitsappearing to the right of the decimal point. For example, the score maybe based on the number of times the digit ‘0’ appears within apredefined number of digits to the right of the decimal point of thecorresponding axis value. The score may also be based on whether thefirst non-zero digit to the right of the decimal point is a ‘5’.

The display module 1110 may then score sets of equally spaced minorticks based on the individual scores of the minor ticks in thecorresponding set. The minor ticks within the highest set score may thenbe selected as the major ticks for the axis. In some implementations,the set score for a given set is based on a summation of the individualscores of the minor ticks in the given set. The set score may also bebased on the difference between the highest axis value and the lowestaxis value in the given set.

The user interaction module 1130 receives user input corresponding tointeraction with the interactive graph. The user interaction module 1130processes the user input to produce user interaction data indicating theuser's request to change the display of the graph. The user interactionmodule 1130 provides the user interaction data to the display module1110, so that the display of the graph can be changed accordingly.

FIG. 12 is a flow chart of an example process that determines thesampling of the mathematical function for display within the searchresults web page. Other implantations may perform the steps in differentorders and/or perform different or additional steps than the onesillustrated in FIG. 12. For convenience, FIG. 12 will be described withreference to one or more computers that performs the process. The systemcan be for example, the display module 1110 described above withreference to FIG. 11.

At step 1200, the system divides a range of variable values of anindependent variable in the mathematical function into a plurality ofsub-ranges. In this example, this range of variable values of theindependent variable represents an extent of the visible frame of theplot within the graph. The number of sub-ranges may for example bedependent on the number of pixels in the interactive graph.

At step 1202, the system selects a sub-range of the plurality ofsub-ranges. At step 1204, the system selects initial sample variablevalues of the independent variable within the selected sub-range. Insome implementations, the initial sample variable values within theselected sub-range may be selected randomly. The number of initialsample variable values within the sub-range may be for example 10.

At step 1206, the system calculates function values of the mathematicalfunction for the initial sample variable values of the independentvariable within the selected sub-range.

At step 1208, the system compares the calculated function values withinthe selected sub-range. At step 1210, the system determines whether adifference between the calculated function values exceeds a thresholdvalue.

If the difference between the calculated function values exceeds thethreshold value, the process continues to step 1212. At step 1212, thesystem iteratively calculates function values for additional samplevariable values for the independent variable within the selectedsub-range, until the difference between calculated function values isless than the threshold value. If the difference at step 1210 is lessthan the threshold value, the process skips step 1212.

The techniques for comparing the function values within the selectedsub-range in step 1208, and adding additional sample variable values instep 1212 can vary from implementation to implementation.

In some implementations, comparing the function values within theselected sub-range may include comparing function values for successiveinitial sample variable values. Pairs of initial sample variable valuescan then be identified that have a difference between correspondingcalculated function values that exceed the threshold value. Additionalsample variable values can then be added between the initial samplevariable values in the identified pairs.

Comparing the function values can include identifying a minimum functionvalue and a maximum function value within a particular sub-range.Additional sample variable values can then be added if the differencebetween the minimum function value and the maximum function valueexceeds the threshold value.

Comparing the function values can include comparing the derivatives ofthe function values within a particular sub-range. For example,additional sample variable values may be added if one of the derivativeshas a sign opposite that of the remaining derivatives in the particularsub-range. In other words, if one of the derivatives has one of apositive and negative value, and the remaining derivatives have theother of the positive and negative value. This may for example indicatethe presence of an asymptote within the particular sub-range.

Comparing the function values can also include identifying initialsample variable values having undefined function values. Additionalsample variable values may then be added between an initial samplevariable value having an undefined function value, and an adjacentinitial sample variable value that has a real value. The additionalsample variable value that is adjacent to an initial sample variablevalue having an undefined function value may be determined for exampleusing a binary search algorithm.

At step 1214, the system determines whether there are additionalsub-ranges that need to be sampled. If so, the process returns to step1202 where another sub-range is selected and subsequently sampled. Onceall of the sub-ranges have been sampled, the process continues to step1216.

At step 1216, the system selects points for use in plotting themathematical function. The points are selected from among the calculatedfunction values and the corresponding initial and additional samplevariable values within the sub-ranges. In some implementations, thesystem may select all of the calculated function values for thecorresponding sample variable values within the sub-ranges to whichadditional sample points have been added.

The system also rejects points from use in plotting the mathematicalfunction that have function values that are undefined. The rejectedpoints are flagged so that no point is displayed for the rejectedpoints, and a new line of the plot is started at the next function valuethat is defined.

The system may also determine one or more approximate points for use inplotting points within sub-ranges that have function values that differby less than a second threshold value. The second threshold value mayfor example be based on the number of pixels that each sub-range spans.In doing so, the number of points that are plotted can be reduced forsub-ranges having function values that change very little. For example,an approximate point within a sub-range may have a value that is anaverage of a minimum function value and a maximum function value withinthat sub-range.

At step 1218, the system displays a plot of the selected points withinthe graph. The points may for example be plotted using piecewise linearrendering to form the plot of the mathematical function. In piecewiselinear rendering, each adjacent pair of function values determine linesegment, and the collection of line segments forms the plot.

To aid in the understanding of certain processes described herein, anexample for adding additional sample value points to sub-ranges areprovided below. In this example, the mathematical function isy=sqrt(sin(x)+tan(x). A range from [−10, 10] for the independentvariable ‘x’ is divided into 1500 sub-ranges.

One sub-range of ‘x’ for this example is from [7.85333, 7.85466]. Theinitial sample variable values, corresponding function values andderivative values for this sub-range are summarized in the followingtable:

Initial Sample Variable Values Function Values Derivative Values7.853618751 2756.710364 7.854869189 −1125.690266 3104832.57 7.85690801−340.7186318 −385012.53 7.857436374 −288.4562469 −98913.60 7.859850555−169.3871116 −49320.72 7.860760094 −146.5238762 −25137.17 7.861812622−126.6952164 −18839.08 7.863160438 −107.943616 −13912.58 7.864459246−94.43813168 −10398.37 7.86571958 −84.18990374 −8131.36

For this sub-range, one of the derivatives has a positive value, and theremaining derivatives have negative values, which indicates the possiblepresence of an asymptote. The absolute value of the derivative having asign that is different than the others, in this case the positive valuederivative, may then be compared to a predetermined threshold value. Ifthe absolute value exceeds the predetermined threshold value, thedetermination is made that an asymptote is present. In this example, thepredetermined threshold value is 10,000,000. Thus, in this example theabsolute value does not exceed the predetermined threshold value.

As a result, additional sample variable values are added between thelast initial sample value in the previous sub-range, and the secondinitial sample variable value in this sub-range, so that this asymptoteof the mathematical function can be accurately plotted. In someimplementations, a predetermined number of additional sample values areadded.

In this example, the predetermined number of samples is fifteen. Theadditional sample variable values, their corresponding function valuesand derivative values are summarized in the table below:

Additional Sample Variable Values Function Values Derivative Values7.852262726 582.7642508 7.85244414 651.4083836 −378383.88 7.852690058775.2476123 −503579.36 7.852757554 817.9399915 −632517.17 7.852948708969.123295 −790897.93 7.853158467 1215.819369 −1176092.91 7.853443961860.864531 −2259407.98 7.853495918 2059.817485 −3829111.09 7.853715963765.014932 −7749418.05 7.853955971 38967.61429 −146670774.917.854051055 −14403.76267 561307653.87 7.854258281 −3613.710768−52069006.31 7.85447142 −2040.706466 −7380180.55 7.854548562−1762.891187 −3601349.19 7.854702207 −1386.783722 −2447899.15

In this example, the absolute value of the derivative having a sign thatis different than the others, exceeds the predetermined threshold. As aresult, the determination is made that an asymptote is present.

Another sub-range of ‘x’ for this example is from [6.28000, 6.28133].The initial sample variable values and corresponding function values forthis sub-range is summarized in the following table:

Initial Sample Variable Values Function Values 6.280721851 NaN6.281772602 NaN 6.28293283 NaN 6.284157755 0.032156533 6.2858053240.053806098 6.28670498 0.06284646 6.2881034 0.075047104 6.2901887150.090689549 6.290750038 0.094539921 6.29312915 0.109662169

For this sub-range, the function values are undefined for the firstthree initial sample variable values. As a result, one or moreadditional sample variable values are added between the third initialsample value of 6.28293283 that is undefined, and the fourth initialsample value of 6.284157755, so that this transition from undefined todefined function values can be accurately plotted. In someimplementations, this transition is determined by performing a binarysearch over a predetermined number of iterations. In this example, thepredetermined number of iterations is fifteen. The additional samplevariable values and their corresponding function values for the variousiterations of the binary search are summarized in the table below:

Additional Sample Variable Values Function Values 6.2835452920.019333254 6.283239061 0.007385448 6.283085945 NaN 6.283162503 NaN6.283200782 0.003949282 6.283181643 NaN 6.283191212 0.0024359496.283186427 0.00105954  6.283184035 NaN 6.283185231 NaN 6.2831858290.000723117 6.28318553 0.000472547 6.283185381 0.000271298 6.283185306NaN 6.283185343 0.000190249

The additional sample variable value with the lowest function value canthen selected for use in plotting the sub-range. In someimplementations, if this additional sample variable value does not havethe minimum or maximum function value for the sub-range, it may not beselected for use in plotting.

While the present invention is disclosed by reference to theimplementations and examples detailed above, it is understood that theseexamples are intended in an illustrative rather than in a limitingsense. Computer-assisted processing is implicated in the describedimplementations. Accordingly, the present technologies may be embodiedin methods for providing an interactive plot of a mathematical functionwithin a search results web page, systems including logic and resourcesto provide an interactive plot of a mathematical function within asearch results web page, systems that take advantage ofcomputer-assisted methods for providing an interactive plot of amathematical function within a search results web page, media impressedwith logic to provide an interactive plot of a mathematical functionwithin a search results web page, data streams impressed with logic toprovide an interactive plot of a mathematical function within a searchresults web page, or computer-accessible services that carry outcomputer-assisted methods for providing an interactive plot of amathematical function within a search results web page. It iscontemplated that modifications and combinations will be within thescope of the following claims.

We claim as follows:
 1. A method comprising: obtaining, using acomputing device, a query; parsing, using the computing device, thequery to identify that the query is associated with a mathematicalfunction and is associated with a request for one or more documents;determining, using the computing device and based on parsing the query,the mathematical function associated with the query; identifying, usingthe computing device, transition points based on function values of themathematical function for corresponding variable values of anindependent variable in the mathematical function; selecting, using thecomputing device, an initial graph range for the corresponding variablevalues of the independent variable based on a number of the identifiedtransition points; selecting, using the computing device, an initialgraph domain for the function values based on the selected initial graphrange; providing, for presentation in a first section of a searchresults web page and using the computing device, the selected initialgraph range and the selected initial graph domain for plotting themathematical function in a graph; and providing, for presentation in asecond section of the search results web page, one or more selectablelinks to the one or more documents associated with the query, the firstsection being different than the second section.
 2. The method of claim1, wherein the transition points include at least one point where: afunction value of the function values is zero, a first derivative of themathematical function is zero, a second derivative of the mathematicalfunction is zero, or the second derivative exceeds a predefined value.3. The method of claim 1, wherein the transition points include at leastone point where the mathematical function has a vertical asymptote. 4.The method of claim 1, wherein the initial graph range includes all ofthe identified transition points.
 5. The method of claim 1, wherein theinitial graph range includes a number of the identified transitionpoints between a minimum threshold number and a maximum thresholdnumber.
 6. The method of claim 1, wherein, when selecting the initialgraph domain, the method includes: calculating function values forcorresponding variable values of the independent variable within theinitial graph range; and selecting the initial graph domain based on aminimum function value and a maximum function value within thecalculated function values.
 7. The method of claim 1, wherein, whenselecting the initial graph range, the method includes: determiningwhether the mathematical function is a predetermined function type; andidentifying, when the mathematical function is the predeterminedfunction type, transition points having characteristics that depend onthe predetermined function type.
 8. The method of claim 1, wherein, whenselecting the initial graph range, the method includes: calculatingfunction values for overlapping ranges of variable values for theindependent variable; determining transition points within theoverlapping ranges; and selecting the initial graph range from among theoverlapping ranges based on a number of the transition points within theoverlapping ranges.
 9. The method of claim 8, further comprising:calculating scores for the overlapping ranges, wherein a score for agiven overlapping range is based on the number of transition pointsoccurring within the given overlapping range; and selecting the initialgraph range from among the overlapping ranges based on the calculatedscores.
 10. The method of claim 9, wherein the score for the givenoverlapping range is weighted based on corresponding variable values ofthe independent variable at the transition points.
 11. A non-transitorycomputer readable storage medium storing instructions, the instructionscomprising: one or more instructions which, when executed by at leastone processor, cause the at least one processor to: receive a query;parse the query to identify that the query is associated with amathematical function and is associated with a request for one or moredocuments; determine, based on parsing the query, the mathematicalfunction associated with the query; identify transition points based onfunction values of the mathematical function for corresponding variablevalues of an independent variable in the mathematical function; selectan initial graph range for the corresponding variable values of theindependent variable based on a number of the identified transitionpoints; select an initial graph domain for the function values based onthe selected initial graph range; provide, for presentation in a firstsection of a search results web page, the selected initial graph rangeand the selected initial graph domain for plotting the mathematicalfunction in a graph; and provide, for presentation in a second sectionof the search results web page, one or more selectable links to the oneor more documents associated with the query, the first section beingdifferent than the second section.
 12. The non-transitory computerreadable storage medium of claim 11, wherein the transition pointsinclude at least one point where: a function value of the functionvalues is zero, a first derivative of the mathematical function is zero,a second derivative of the mathematical function is zero, or the secondderivative exceeds a predefined value.
 13. The non-transitory computerreadable storage medium of claim 11, wherein the transition pointsinclude at least one point where the mathematical function has avertical asymptote.
 14. The non-transitory computer readable storagemedium of claim 11, wherein the initial graph range includes all of theidentified transition points.
 15. The non-transitory computer readablestorage medium of claim 11, wherein the initial graph range includes anumber of the identified transition points between a minimum thresholdnumber and a maximum threshold number.
 16. The non-transitory computerreadable storage medium of claim 11, wherein the one or moreinstructions to select the initial graph domain include: one or moreinstructions to calculate function values for corresponding variablevalues of the independent variable within the initial graph range; andone or more instructions to select the initial graph domain based on aminimum function value and a maximum function value within thecalculated function values.
 17. The non-transitory computer readablestorage medium of claim 11, wherein the one or more instructions toselect the initial graph range include: one or more instructions todetermine whether the mathematical function is a predetermined functiontype; and one or more instructions to identify, when the mathematicalfunction is the predetermined function type, transition points havingcharacteristics that depend on the predetermined function type.
 18. Thenon-transitory computer readable storage medium of claim 11, wherein theone or more instructions to select the initial graph range include: oneor more instructions to calculate function values for overlapping rangesof variable values for the independent variable; one or moreinstructions to determine transition points within the overlappingranges; and one or more instructions to select the initial graph rangefrom among the overlapping ranges based on a number of the transitionpoints within the overlapping ranges.
 19. The non-transitory computerreadable storage medium of claim 18, where the instructions furtherinclude: one or more instructions to calculate scores for theoverlapping ranges, wherein a score for a given overlapping range isbased on the number of transition points occurring within the givenoverlapping range; and one or more instructions to select the initialgraph range from among the overlapping ranges based on the calculatedscores.
 20. The non-transitory computer readable storage medium of claim19, wherein the score for the given overlapping range is weighted basedon corresponding variable values of the independent variable at thetransition points.
 21. A system comprising: a memory to storeinstructions; and one or more processors to execute the instructions to:obtain a query; parse the query to identify that the query is associatedwith a mathematical function and is associated with a request for one ormore documents; determine, based on parsing the query, the mathematicalfunction associated with the query; identify transition points based onfunction values of the mathematical function for corresponding variablevalues of an independent variable in the mathematical function; selectan initial graph range for the corresponding variable values of theindependent variable based on a number of the identified transitionpoints; select an initial graph domain for the function values based onthe selected initial graph range; provide, for presentation in a firstsection of a search results web page, the selected initial graph rangeand the selected initial graph domain for plotting the mathematicalfunction in a graph, and provide, for presentation in a second sectionof the search results web page, one or more selectable links to the oneor more documents associated with the query, the first section beingdifferent than the second section.
 22. The system of claim 21, whereinthe transition points include at least one point where: a function valueof the function values is zero, a first derivative of the mathematicalfunction is zero, a second derivative of the mathematical function iszero, or the second derivative exceeds a predefined value.
 23. Thesystem of claim 21, wherein the transition points include at least onepoint where the mathematical function has a vertical asymptote.
 24. Thesystem of claim 21, wherein the initial graph range includes all of theidentified transition points.
 25. The system of claim 21, wherein theinitial graph range includes a number of the identified transitionpoints between a minimum threshold number and a maximum thresholdnumber.
 26. The system of claim 21, wherein the one or more processors,when selecting the initial graph domain, are further to: calculatefunction values for corresponding variable values of the independentvariable within the initial graph range; and select the initial graphdomain based on a minimum function value and a maximum function valuewithin the calculated function values.
 27. The system of claim 21,wherein the one or more processors, when selecting the initial graphrange, are further to: determine whether the mathematical function is apredetermined function type; and identify, when the mathematicalfunction is the predetermined function type, transition points havingcharacteristics that depend on the predetermined function type.
 28. Thesystem of claim 21, wherein the one or more processors, when selectingthe initial graph range, are further to: calculate function values foroverlapping ranges of variable values for the independent variable;determine transition points within the overlapping ranges; and selectthe initial graph range from among the overlapping ranges based on anumber of the transition points within the overlapping ranges.
 29. Thesystem of claim 28, wherein the one or more processors are further to:calculate scores for the overlapping ranges, wherein a score for a givenoverlapping range is based on the number of transition points occurringwithin the given overlapping range; and select the initial graph rangefrom among the overlapping ranges based the calculated scores.
 30. Thesystem of claim 29, wherein the score for the given overlapping range isweighted based on corresponding variable values of the independentvariable at the transition points.